#ifndef MEDICAL_H
#define MEDICAL_H

#include <QMainWindow>
#include <QPushButton>
#include <QLineEdit>
#include <QLabel>
#include <QMessageBox>
#include <QComboBox>
#include "switch_verify.h"
#include "on_off_verify.h"
#include <QSql>
#include <QDebug>
#include <QtSql/QSqlError>
#include <QtSql/QSqlQuery>
#include <QTimer>
#include <QMessageBox>
#include "history_show.h"
namespace Ui {
class Medical;
}

class Medical : public QMainWindow
{
    Q_OBJECT

public:
    explicit Medical(QWidget *parent = 0);
    ~Medical();
    QString name_text;//接受来自登陆信息的用户名
    QString passwd_text;//接收来自登陆信息的密码

private:
    Ui::Medical *ui;
    QLabel *Bed_Nub;
    QComboBox *Bed;
    QLabel *name;
    QLabel *name_value;
    QLabel *Bed_Num_lable;
    QLabel *Bed_value;
    QLabel *USE_lable;
    QLabel *USE_Pa;
    QLabel *USE_capacity;
    QLabel *standby_lable;
    QLabel *standby_Pa;
    QLabel *standby_capacity;
    QLabel *Pa_lable;
    QLabel *capacity_lable;
    QPushButton *switch_ptn;
    QPushButton *on_off_ptn;
    QPushButton *History_ptn;
    QLabel *message_left;
    QLabel *message_right;
    Switch_verify *switch_o;
    ON_Off_Verify *on_off;
    QSqlQuery query;
    QSqlDatabase db;
    QSqlQuery query_P;
    QTimer *timer;
    History_Show *history;

    bool Warning_State;//用于检测是否当前有警告窗口，当有时 不在弹出，否则弹出
    bool CON_MYSQL_Patient();

protected slots:
    void switch_ptn_clicked();
    void on_off_ptn_clicked();
    void on_History_ptn_clicked();
    int DISPLAY();
};




#endif // MEDICAL_H
